This invention relates to a system for updating and synchronizing a document on a network server from a remote device. More specifically, this invention uses the Document Object Model (DOM) specification to manipulate documents, including databases that conform to the XML document structure specification, to enable remote workstations, or clients, to update a database on a server. Because the invention performs the update through the transmission of the minimum amount of information necessary to fully update the server""s database, it is suitable for applications, including wireless transmissions, transmissions in which the connection between the client and server is of limited bandwidth, transmissions using conventional telephone lines, and transmissions through computer networks using physical media.
In modern business and industrial applications, it is imperative that critical databases be updated and synchronized frequently and regularly to ensure the accuracy of their information. It is common for entire offices and buildings to be devoted to personnel whose primary task is to enter data into a database in the form of additions of new data, deletions of old data, or modifications of existing data. The data is entered from workstations (xe2x80x9cclientsxe2x80x9d) that are networked with a server upon which the main database resides. Each change to the data is transmitted to the server, which will temporarily lock the record from access by other users, make and save the change, and then unlock the record so that it may be accessed by other users. This process is repeated countless times during the course of a normal workday, each change requiring essentially the same steps to be taken. When the server and its clients are directly connected over a large bandwidth connection, the overhead that may be inherent in multiple changes being made to the same record may not be detrimental to the overall throughput of the system. However, when the server and its clients must communicate over narrow bandwidth channels, the possibility for congestion to detrimentally affect system performance is significantly greater. The degree of congestion rises with the size of the database, the number of entries needed to keep it current, and the frequency with which accesses to the database are made.
The advent and increasing prevalence of wireless communications has made it possible for databases to be maintained and brought current from remote sites. Using wireless technology, critical databases can be maintained in a near-current state from cellular telephones, hand-held devices, and personal data assistants (PDA""s), regardless of where they may be located. Common uses for such technology may be found in the maintenance of personal and business calendars from PDA""s that are remote from the server where the organization""s entire calendar is maintained, sales automation and inventory management, and similar applications. Uses for such technology could involve a customer""s use of a handheld device to register purchases in a supermarket; automated closeout of a car rental upon return of the vehicle without the need for human oversight; or position tracking for vehicles and aircraft based, not upon a radar/transponder reflection, but upon the vehicle""s own report of its position from global satellite positioning data. Virtually every database application in which timely and accurate information updating is critical is subject to remote data entry that may rely upon wireless communications.
A primary drawback for such applications is that the bandwidth available for database updates from remote clients may be limited. As wireless devices become more prevalent, the availability of bandwidth for each application and user will diminish, resulting in transmission bottlenecks, communications delays, and ultimately, the untimely update of project-critical information. Since common wireless applications such as cellular telephones and wireless Internet PDAs are commonly assigned narrow bandwidths, there is a need for a system that will reduce the number of accesses from client to server and that will require the transmission of only the smallest amount of data that is necessary to provide complete information for the server to update its database. The concept of sending only the smallest amount of information needed to perform the update is known as xe2x80x9cgranularity.xe2x80x9d In general, a finer granularity results in a more efficient the use of the available bandwidth.
The present invention is a system that resides on the remote client, and which notes and records the accumulation of mutations (additions, deletions, modifications) to the client""s local database, which normally will constitute a subset of the main database that resides on the server. Before changes to the local database are transmitted to the server, they are processed and reduced to the smallest amount of data, or the finest granularity, that will allow the server to record the changes to the main database. The system uses XML (extensible Markup Language) documents to represent the local database, and further uses the DOM (Document Object Model) established by the World Wide Web Consortium (W3C), to provide a standardized interface for manipulation of the XML document. Although the specifications for the DOM and the XML are currently undergoing a process of development and refinement, the implementation of those specifications in this invention is not intended to be version-specific, but is generic and should perform effectively with future versions of those specifications as well as with all existing versions.
In XML, a xe2x80x9cdocumentxe2x80x9d may represent a collection of related data, including a database. In the DOM specification, an XML document may be represented as a logical xe2x80x9ctreexe2x80x9d having objects, or xe2x80x9cnodes,xe2x80x9d located in a hierarchical branching structure. Each node has various properties, including at least a xe2x80x9cnamexe2x80x9d (or xe2x80x9clabelxe2x80x9d) property, and a xe2x80x9cdata valuexe2x80x9d property. Each discrete data element in the XML document can be identified by an XML tag, and the DOM will have a node corresponding to each such data element. When data in the XML document is added, deleted, or modified, the DOM also changes to reflect the modification. The automatic modification of the DOM to conform to the XML document is a property of the DOM specification and its implementation. Mutations to the XML document are recorded in an Event Table as xe2x80x9cevents.xe2x80x9d All events are stored, cross referenced to the path of the node, a timestamp, and the mutation type. When data synchronization occurs, the Event Table is parsed, and each node at which multiple events took place is collapsed to a single event using a set of rules described below. The data value of such collapsed node is the value left by the last mutation involving the node. By collapsing the number of node events in the DOM after modifications have been made to the document, the data necessary to update the main database is brought to a minimum, and may then be transmitted to the server for application to the main database.
The process of collapsing the number of node events requires a sorting, followed by the parsing of each event in the Event Table whereby events to be passed to the remote database will be saved in a Save Table, while redundant events are discarded. When the Save Table has been created, a synchronization manager will then retrieve data from each node referenced in the Save Table, and the data for each event in the Save Table will be transmitted to the main database along with the node address, an optional date stamp, and the event type.
Accordingly, it is an object of the present invention to provide a system for tracking changes made at a workstation to a subset of a database and, before sending the changes to the server, to reduce to a minimum the amount of a information that must be sent. It is a further object of this invention to increase the efficiency of database updates over narrow bandwidth communication channels. It is another object of the invention to utilize the XML and DOM specifications to process data on a remote client using a standardized format for reducing the amount of information necessary to fully describe the changes to the database. These and other objects of the invention will become evident through the following description of the invention.